Drawing.createBrushDef Method

Creates an SVG element to represent a brush for an element with the specified width and height.
 
 
Static This method is static.

Parameters

brush

Type: Brush
width

Type: Number
The width of the element the brush is being applied to in pixels.
height

Type: Number
The height of the element the brush is being applied to in pixels.
x

Type: Number
The horizontal position of the center of element in its coordinate space if not centered and if required according to isXYRequiredForSvgBrush.
Optional: True
y

Type: Number
The vertical position of element in its coordinate space if not centered and if required according to isXYRequiredForSvgBrush.
Optional: True
plotArea

Type: Object
The area defining the coordinate space in which element is positioned
 if it does not occupy 100%. Structure:
     width   [type: Number]
     height  [type: Number]
 

Optional: True

Return Value


Type: SVGElement - May be null
An element that can be referenced by ID in paint properties; or null if not applicable for brush.